package com.kateba.android.utils;

import android.content.SharedPreferences;

import com.teksoftco.android.blueinput.Singleton;

public class Settings
{
  private short SHAREDPREF_LICENSE_CODE_KEY = 100;
  private short SHAREDPREF_SETT_DEBUG = 101;
  private short SHAREDPREF_SETT_HINTS = 105;
  private short SHAREDPREF_SETT_KBSOUNDS = 102;
  private short SHAREDPREF_SETT_LAYOUT = 106;
  private short SHAREDPREF_SETT_MOUSESOUNDS = 103;
  private int m_RegKeys = 0;
  private boolean m_RegStatus = false;

  public boolean getBoolean(String paramShort)
  {
    return Singleton.prefs.getBoolean(paramShort, false);
  }

  public boolean getBoolean(short sHAREDPREF_SETT_DEBUG2, boolean paramBoolean)
  {
    return Singleton.prefs.getBoolean(""+sHAREDPREF_SETT_DEBUG2, paramBoolean);
  }

  public boolean getDebug()
  {
    return getBoolean(this.SHAREDPREF_SETT_DEBUG, false);
  }

  public boolean getHints()
  {
    return getBoolean(this.SHAREDPREF_SETT_HINTS, true);
  }

  public int getInt(String paramShort)
  {
    return Singleton.prefs.getInt(paramShort, 0);
  }

  public int getInt(String paramShort, int paramInt)
  {
    return Singleton.prefs.getInt(paramShort, paramInt);
  }

  public boolean getKBSounds()
  {
    return getBoolean(this.SHAREDPREF_SETT_KBSOUNDS, true);
  }

  public String getKey()
  {
    return getString(this.SHAREDPREF_LICENSE_CODE_KEY);
  }

  public int getLayoutID()
  {
    return getInt(""+this.SHAREDPREF_SETT_LAYOUT, 0);
  }

  public boolean getMouseSounds()
  {
    return getBoolean(this.SHAREDPREF_SETT_MOUSESOUNDS, false);
  }

  public boolean getRegStatus()
  {
    return this.m_RegStatus;
  }

  public String getString(String paramString1, String paramString2)
  {
    return Singleton.prefs.getString(paramString1, paramString2);
  }

  public String getString(short paramShort)
  {
    return Singleton.prefs.getString(""+paramShort, "");
  }

  public int getTrialKeys()
  {
    return this.m_RegKeys;
  }

  public void incTrialKeys()
  {
    this.m_RegKeys = (1 + this.m_RegKeys);
    if (this.m_RegKeys > 1000)
      this.m_RegKeys = 0;
  }

  public void setBoolean(short paramShort, boolean paramBoolean)
  {
    SharedPreferences.Editor localEditor = Singleton.prefs.edit();
    localEditor.putBoolean(""+paramShort, paramBoolean);
    localEditor.commit();
  }

  public void setDebug(boolean paramBoolean)
  {
    setBoolean(this.SHAREDPREF_SETT_DEBUG, paramBoolean);
  }

  public void setHints(boolean paramBoolean)
  {
    setBoolean(this.SHAREDPREF_SETT_HINTS, paramBoolean);
  }

  public void setInt(short paramShort, int paramInt)
  {
    SharedPreferences.Editor localEditor = Singleton.prefs.edit();
    localEditor.putInt(""+paramShort, paramInt);
    localEditor.commit();
  }

  public void setKBSounds(boolean paramBoolean)
  {
    setBoolean(this.SHAREDPREF_SETT_KBSOUNDS, paramBoolean);
  }

  public void setKey(String paramString)
  {
    setString(""+this.SHAREDPREF_LICENSE_CODE_KEY, paramString);
  }

  public void setLayoutID(int paramInt)
  {
    setInt(this.SHAREDPREF_SETT_LAYOUT, paramInt);
  }

  public void setMouseSounds(boolean paramBoolean)
  {
    setBoolean(this.SHAREDPREF_SETT_MOUSESOUNDS, paramBoolean);
  }

  public void setRegStatus(boolean paramBoolean)
  {
    this.m_RegStatus = paramBoolean;
  }

  public void setString(String paramShort, String paramString)
  {
    SharedPreferences.Editor localEditor = Singleton.prefs.edit();
    localEditor.putString(paramShort, paramString);
    localEditor.commit();
  }

  public void setTrialKeys(int paramInt)
  {
    this.m_RegKeys = paramInt;
  }
}